# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
project(ohos_nodeapi_dem)

set(TARGET_NAME entry)
set(CMAKE_SKIP_RPATH TRUE)
set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)

add_library(${TARGET_NAME} SHARED napi_init.cpp)
target_link_libraries(${TARGET_NAME} PUBLIC libace_napi.z.so hilog_ndk.z.so)

add_subdirectory(function)
add_subdirectory(class)
add_subdirectory(call_js_function)
add_subdirectory(async_function)